<template>
  <span>
	  <el-select :value="value" placeholder="请选择" @change="change" :clearable="clearable">
	  	<slot name="option"></slot>
      <el-option value="" label="全部">全部</el-option>
	    <el-option
	      v-for="item in options"
	      :key="item.value"
	      :label="item.name"
	      :value="item.value">
	    </el-option>
	  </el-select>
  </span>
</template>
<script>
    export default {
		  props: {
		  	clearable: {
		  		type:Boolean,
		  		default: false
		  	},
				value: String
		  },
      data(){
          return {
            options: [
              {
                name: '首页',
                value: 'index'
              },
              {
                name: '找高手',
                value:'superior'
              },
              {
                name:'直播',
                value:'webcast'
              }
            ]
          }
      },
      methods: {
      	change (n) {
      		this.$emit('input',n)
      	}
      }
    }
</script>